home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / glibc108.zip / glibc108 / sysdeps / mach / sysdep.h < prev    next >
C/C++ Source or Header  |  1994-05-16  |  3KB  |  72 lines

  1. /* Copyright (C) 1994 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3.  
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public License as
  6. published by the Free Software Foundation; either version 2 of the
  7. License, or (at your option) any later version.
  8.  
  9. The GNU C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12. Library General Public License for more details.
  13.  
  14. You should have received a copy of the GNU Library General Public
  15. License along with the GNU C Library; see the file COPYING.LIB.  If
  16. not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  17. Cambridge, MA 02139, USA.  */
  18.  
  19. /* This is invoked by things run when there is random lossage, before they
  20.    try to do anything else.  Just to be safe, deallocate the reply port so
  21.    bogons arriving on it don't foul up future RPCs.  */
  22.  
  23. #define FATAL_PREPARE __mig_dealloc_reply_port ()
  24.  
  25. /* sysdeps/mach/MACHINE/sysdep.h should define the following macros.  */
  26.  
  27. /* Produce a text assembler label for the C global symbol NAME.  */
  28. #ifndef ENTRY
  29. #define ENTRY(name)
  30. #error ENTRY not defined by sysdeps/mach/MACHINE/sysdep.h
  31. #endif
  32.  
  33. /* Define a C function called NAME which does system call NUMBER.  */
  34. #ifndef SYSCALL_TRAP
  35. #define SYSCALL_TRAP(name, number)
  36. #error SYSCALL_TRAP not defined by sysdeps/mach/MACHINE/sysdep.h
  37. #endif
  38.  
  39. /* Set variables ARGC, ARGV, and ENVP for the arguments
  40.    left on the stack by the microkernel.  */
  41. #ifndef SNARF_ARGS
  42. #define SNARF_ARGS(argc, argv, envp)
  43. #error SNARF_ARGS not defined by sysdeps/mach/MACHINE/sysdep.h
  44. #endif
  45.  
  46. /* Call the C function FN with no arguments,
  47.    on a stack starting at SP (as returned by *_cthread_init_routine).
  48.    You don't need to deal with FN returning; it shouldn't.  */
  49. #ifndef    CALL_WITH_SP
  50. #define CALL_WITH_SP(fn, sp)
  51. #error CALL_WITH_SP not defined by sysdeps/mach/MACHINE/sysdep.h
  52. #endif
  53.  
  54. /* LOSE can be defined as the `halt' instruction or something
  55.    similar which will cause the process to die in a characteristic
  56.    way suggesting a bug.  */
  57. #ifndef LOSE
  58. #define    LOSE    __task_terminate (__mach_task_self ())
  59. #endif
  60.  
  61. /* One of these should be defined to specify the stack direction.  */
  62. #if !defined (STACK_GROWTH_UP) && !defined (STACK_GROWTH_DOWN)
  63. #error stack direction unspecified
  64. #endif
  65.  
  66. /* Used by some assembly code.  */
  67. #ifdef NO_UNDERSCORES
  68. #define C_SYMBOL_NAME(name)    name
  69. #else
  70. #define C_SYMBOL_NAME(name)    _##name
  71. #endif
  72.